<?php Yii::app()->clientScript->registerCoreScript('jquery');?>
<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/jquery.charcounter.js');?>
<?php Yii::app()->clientScript->registerScript('limitText','$("#isi").charCounter(480);');?>

<div class="form"  >
<?php $form=$this->beginWidget('CActiveForm'); ?>

    <?php echo $form->errorSummary($sms); ?>
 
    
       <?php if($status==1)
        {
            echo"<div class='row' style='height:35px;width:387px' >";
            echo "<h6 style='color:green'>Complain anda sudah kami tampung. Terimakasih</h4> </div>";
        }else if($status==3){
            echo"<div class='row' style='height:35px;width:387px' >";
            echo "<h6 style='color:red'>Field Isi Komplain harap diisi</h4> </div>";
        } 
        ?>
    
    
    <div class="row">
        <?php echo $form->label($sms,'Kompain Kepada'); ?>
        <?php echo $form->dropDownList($sms,'kepada',$sms->item); ?>
    </div>
 
    <div class="row">
        
        <?php echo $form->label($sms,'Isi Komplain:'); ?>
        <?php if($status==3) {echo $form->textArea($sms,'isi',array('rows'=>11, 'cols'=>40, 'id'=>'isi','style'=>'border-color:red;border-style:solid'));} else
         {echo $form->textArea($sms,'isi',array('rows'=>11, 'cols'=>40, 'id'=>'isi'));} ?>
        <?php echo CHtml::submitButton('Submit'); ?>
    </div>
    
 
<?php $this->endWidget(); ?>
</div><!-- form -->

